//
//  OrderTableViewCell.m
//  ShangAPP
//
//  Created by macpro on 16/1/23.
//  Copyright © 2016年 wangdao. All rights reserved.
//

#import "OrderTableViewCell.h"
#import "MyTools.h"
@implementation OrderTableViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self viewCreate];
    }
    return self;
}

-(void)viewCreate{
    
    //50
    _stateimage = [[UIImageView alloc]initWithFrame:CGRectMake(WIDTH-65, 0, 65, 65)];
    [self addSubview:_stateimage];
    
    NSArray *arr = @[@"收 货 人:",@"收货地址:",@"本单收入:",@"下单时间:",@"买家留言:"];
    for (int i = 0; i<5; i++) {
        UILabel *numlab = [[UILabel alloc]initWithFrame:CGRectMake(10, (5+27*i), 70, 20)];
        if (i==4) {
            numlab.frame = CGRectMake(10, 15+27*4, 70, 20 );
        }
        numlab.text = arr[i];
        numlab.textColor = UIColorFromRGB(0x333333);
        numlab.font = [UIFont systemFontOfSize:14];
        [self addSubview:numlab];
    }
    _name = [[UILabel alloc]initWithFrame:CGRectMake(80, 5, 100, 20)];
    _name.text = @"";
    _name.textColor = UIColorFromRGB(0x333333);
    _name.font = [UIFont systemFontOfSize:14];
    [self addSubview:_name];
    
    _phoneNum = [[UILabel alloc]initWithFrame:CGRectMake(80, 5, 100, 20)];
    _phoneNum.text = @"";
    _phoneNum.textColor = UIColorFromRGB(0x333333);
    _phoneNum.font = [UIFont systemFontOfSize:14];
    [self addSubview:_phoneNum];
    
    _address = [[UILabel alloc]initWithFrame:CGRectMake(80, 35, WIDTH - 90, 20)];
    _address.textColor = UIColorFromRGB(0x666666);
    _address.font = [UIFont systemFontOfSize:12];
    _address.numberOfLines=0;
    [self addSubview:_address];
    
    _moneyLeb = [[UILabel alloc]initWithFrame:CGRectMake(80, 60, 140, 20)];
    _moneyLeb.text = @"";
    _moneyLeb.textColor = UIColorFromRGB(0xe51c23);
    _moneyLeb.font = [UIFont systemFontOfSize:14];
    _moneyLeb.numberOfLines=0;
    [self addSubview:_moneyLeb];
    
    _timeLab = [[UILabel alloc]initWithFrame:CGRectMake(80, 87, 140, 20)];
    _timeLab.text = @"";
    _timeLab.textColor = UIColorFromRGB(0xe51c23);
    _timeLab.font = [UIFont systemFontOfSize:14];
    [self addSubview:_timeLab];
    
    _otherLab = [[UILabel alloc]initWithFrame:CGRectMake(80, 113, 180, 40)];
    _otherLab.text = @"";
    _otherLab.numberOfLines =0;
    _otherLab.textColor = UIColorFromRGB(0x666666);
    _otherLab.font = [UIFont systemFontOfSize:13];
    [self addSubview:_otherLab];
    
//    UIView *view1 = [[UIView alloc]initWithFrame:CGRectMake(0, 140, WIDTH, 1)];
//    view1.backgroundColor = UIColorFromRGB(0xebebeb);
//    [self addSubview:view1];
    
    UIView *view = [[UIView alloc]initWithFrame:CGRectMake(0, 170, WIDTH, 10)];
    view.backgroundColor = UIColorFromRGB(0xebebeb);
    [self addSubview:view];
    

}


@end
